﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="DataLoad">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="1" name="Pattern">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" minOccurs="1" name="Entity">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Property" maxOccurs="unbounded" minOccurs="1">
                      <xs:complexType>
                        <xs:attribute name="propertyName" type="xs:string" use="required" />
                        <xs:attribute name="type" type="xs:string" use="required" />
                        <xs:attribute name="key" type="xs:boolean" use="optional" />
                        <xs:attribute name="references" type="xs:string" use="optional" />
                        <xs:attribute name="hint" type="xs:string" use="optional" />
                        <xs:attribute name="nullable" type="xs:boolean" use="optional" />
                        <xs:attribute name="default" type="xs:string" use="optional" />
                        <xs:attribute name="actualValue" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="entityName" type="xs:string" use="required" />
                  <xs:attribute name="tableName" type="xs:string" use="required" />
                  <xs:attribute name="identityInsert" type="xs:boolean" use="optional" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="patternName" type="xs:string" use="required" />
            <xs:attribute name="quantity" type="xs:unsignedShort" use="required" />
            <xs:attribute name="insertIntoDb" type="xs:boolean" use="required" />
            <xs:attribute name="generateCSV" type="xs:boolean" use="required" />
            <xs:attribute name="persistSQL" type="xs:boolean" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="cleanDB" type="xs:boolean" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>